package cn.wen.yinxiu.works.controller;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import cn.wen.yinxiu.common.convention.result.Results;
import cn.wen.yinxiu.works.vo.TypeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import cn.wen.yinxiu.works.entity.TypeEntity;
import cn.wen.yinxiu.works.service.TypeService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.common.convention.result.ResultEntity;

/**
 *
 * @ClassName: TypeController
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-22 09:39:56
 * @Description: 作品类别表的Controller层
 */
@RestController
@RequestMapping("/web")
public class TypeController {

    @Autowired
    private TypeService typeService;

    /**
     * 获取作品分类列表
     *
     * @return
     */
    @GetMapping("/works/type/list")
    public ResultEntity getWorksTypeList() {
        List<TypeVO> resList = typeService.getWorksTypeList();
        return Results.success(resList);
    }


}
